Method and system for creating and providing a multi-tier networked service

ABSTRACT

A multi-tier application for interaction with a user interface, such as a browser on a PC or PDA. The application comprises a presentation tier (such as a web server with a JSP/servlet engine) and a business logic tier (such as an application server) to manipulate data for subsequent presentation on the user interface. A direction module has a plurality of coupled directions, including a function direction to direct a corresponding functional component to perform a data processing function using the business logic tier and provide a data processing output, and a presentation direction to direct a corresponding presentation component to incorporate the data processing output, when applicable, into a presentation template to produce a presentation element for the user interface. The function component and presentation component are independent and separate from each other, the connection being the function component produces the data and the presentation component consumes the output data. The presentation component is an abstract representation of a general kind of presentation element, each specific presentation element having its layout and format (such as markup language) stored in a different presentation template, and the reference to a specific presentation template for the presentation component can be determined at processing time in the presentation tier.

This application is a Continuation of U.S. patent application Ser. No.12/153,899 Filed May 27, 2008 which is a Continuation of U.S. patentapplication Ser. No. 10/741,216, filed Dec. 19, 2003, in its entiretyherein incorporated by reference.

The present invention relates to a method and system for creating andproviding a multi-tier networked service.

BACKGROUND OF THE INVENTION

Internet or web based client applications for delivering a networkedservice generally have two main components. The first is the “look andfeel” component of the client application. The second component is theclient's application functionality. The “look and feel” hastraditionally been the purview of a web designer, who has the requisiteskills to prepare and create the presentation elements of theapplication. The client application's functionality traditionally hasbeen handled by a web developer, who creates, implements and assemblesthe functional elements of the client application.

The presentation and functional elements of a client application arenormally incorporated in the same application files, the result beingthat designers and developers work on the same file. There are severalpotential disadvantages associated with this approach. For example, ifany element of the client application (presentation or function) ischanged, then the whole client application client may have to berecompiled. Also, there may be potential problems relating to versioncontrol, duplication of work, and client application extensibility.

The advent of Java and Java Server Pages remedied some of theseproblems. A Java Server Page in conjunction with Java Beans orenterprise Java Beans permitted many of the functional elements of aclient application to be separated from the presentation elements,thereby permitting the developer to create and modify the functionalunits (e.g., java beans) while freeing the presentation elements of thejava server page to the web designer. This approach, however, continuesto suffer from many of the same drawbacks as the traditional clientapplication approach. If a presentation or functional element changed,then it may be necessary to amend and possibly recreate the Java ServerPage. Since the Java Server Page still includes both functional andpresentation elements, there also remains the potential problems ofversion control and work duplication.

It is an object of the present invention to provide a multi-tierapplication to obviate or mitigate at least some of the above presenteddisadvantages.

SUMMARY OF THE INVENTION

The presentation and functional elements of a client application arenormally incorporated in the same application files, the result beingthat designers and developers work on the same file. There are severalpotential disadvantages associated with this approach. For example, ifany element of the client application (presentation or function) ischanged, then the whole client application client may have to berecompiled. Also, there may be potential problems relating to versioncontrol, duplication of work, and client application extensibility.Contrary to present client applications, there is provided a multi-tierapplication for interaction with a user interface, such as a browser ona PC or PDA. The application comprises a presentation tier (such as aweb server with a JSP/servlet engine) and a business logic tier (such asan application server) to manipulate data for subsequent presentation onthe user interface. A direction module has a plurality of coupleddirections, including a function direction to direct a correspondingfunctional component to perform a data processing function using thebusiness logic tier and provide a data processing output, and apresentation direction to direct a corresponding presentation componentto incorporate the data processing output, when applicable, into apresentation template to produce a presentation element for the userinterface. The function component and presentation component areindependent and separate from each other, the connection being thefunction component produces the data and the presentation componentconsumes the output data. The presentation component is an abstractrepresentation of a general kind of presentation element, each specificpresentation element having its layout and format (such as markuplanguage) stored in a different presentation template, and the referenceto a specific presentation template for the presentation component canbe determined at processing time in the presentation tier.

According to the present invention, there is provided a method forhosting a computer executable multi-tier application for interactionover a network with a user interface, the application including anapplication presentation tier. The method comprises the steps of:selecting a first presentation template, the first template including afirst presentation instruction for defining a corresponding firstpresentation element; selecting a first presentation component of theapplication presentation tier for processing the first presentationinstruction; and linking the first presentation component to the firsttemplate, wherein the first component processes the first presentationinstruction and generates the first presentation element duringexecution of the multi-tier application for subsequent delivery to theuser interface.

The method comprises the additional steps of: selecting a secondpresentation template, the second template including a secondpresentation instruction for defining a corresponding secondpresentation element; selecting the first presentation component forprocessing the second presentation instruction; and linking the firstcomponent to the second template; wherein the first component processesthe second presentation instruction and generates the secondpresentation element during execution of the multi-tier application forsubsequent delivery to the user interface.

In a preferred embodiment, the presentation templates are computerreadable files of a file system and the presentation instructions areselected from the group comprising: layout, style and format of thefirst presentation element. In a further embodiment, the presentationinstructions are written in a markup language selected from the groupcomprising: HTML, HDML and WML.

The first presentation component is a computer executable file. In apreferred embodiment, the computer executable file is a java bean.

The method may also include an application logic tier and the additionalsteps of: selecting an input datum; selecting a first function componentof the application logic tier for processing the input datum; linkingthe input datum to the first function component, wherein the firstfunction component processes the input datum and generates an outputdatum during execution of the multi-tier application; directing thefirst presentation component to process an output data presentationinstruction for further defining the corresponding first presentationelement to include the output datum, wherein the first presentationcomponent processes the output datum presentation instruction andgenerates the first presentation element incorporating the output datumduring execution of the multi-tier application.

The first function component is a computer executable file. In apreferred embodiment, the computer executable file is a java bean.

The present invention also provides a system for hosting a computerexecutable multi-tier application for interaction over a network with auser interface, the application including an application presentationtier. The system comprises a first presentation template, the firsttemplate including a first presentation instruction for defining acorresponding first presentation element; a first presentation componentof the application presentation tier for processing the firstpresentation instruction; and, a first direction element for linking thefirst presentation component to the first template; wherein the firstcomponent processes the first presentation instruction and generates thefirst presentation element during execution of the multi-tierapplication for subsequent delivery to the user interface.

The system may also include a second presentation template, the secondtemplate including a second presentation instruction for defining acorresponding second presentation element; and a second directionelement for linking the first component to the second template, whereinthe first component processes the second presentation instruction andgenerates the second presentation element during execution of themulti-tier application for subsequent delivery to the user interface.

The system may further include a first function component of theapplication logic tier for processing an input datum; and, the firstdirection element further linking the input datum to the first functioncomponent, wherein the first function component processes the inputdatum and generates an output datum during execution of the multi-tierapplication. An output data presentation instruction further defines thecorresponding first presentation element to include the output datum.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features of the preferred embodiments of the inventionwill become more apparent in the following detailed description in whichreference is made to the appended drawings wherein:

FIG. 1 is a schematic view of a system according to an embodiment of thepresent invention;

FIG. 2 is an expanded schematic view of the system of FIG. 1;

FIG. 3 is a schematic view of the steps in processing a requestedresource according to an embodiment of the present invention;

FIG. 4 is a schematic view of the elements within each tier of amulti-tier application according to an embodiment of the presentinvention;

FIG. 5 is a schematic view of an alternate embodiment of the system ofFIG. 1;

FIG. 6( a) is a schematic illustration of a Java Server Page;

FIG. 6( b) is a schematic illustration of a Java Server Page accordingto an embodiment of the present invention;

FIG. 7 is a logical view of a function component according to anembodiment of the present invention;

FIG. 8( a) is a schematic illustration of a static presentationcomponent according to an embodiment of the present invention;

FIG. 8( b) is a schematic illustration of a dynamic presentationcomponent according to an embodiment of the present invention;

FIG. 9 is a schematic illustration of the output of a processing a JavaServer Page according to an embodiment of the present invention;

FIG. 10 is a logical view of a client application using a Java ServerPage according to an embodiment of the present invention;

FIG. 11 is a logical view of a processing step of a client applicationaccording to the present invention;

FIG. 12 is a schematic view of the output of a processing step of aclient application according to an embodiment of the present invention;

FIG. 13 is an expanded schematic view of the system and the processedoutputs of the client application illustrated according to an embodimentof the present invention;

FIG. 14 is a schematic view of the elements of a client application andassociated system according to an embodiment of the present invention;

FIG. 15 is a flowchart illustrating the steps in a method according toan embodiment of the present invention;

FIG. 16 is a flowchart illustrating further steps in the method of FIG.15 according to an embodiment of the present invention;

FIG. 17 is a flowchart illustrating alternate further steps in themethod of FIG. 15 according to an embodiment of the present invention;and,

FIG. 18 is a flowchart illustrating further steps in the method of FIG.17 according to an embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring to FIG. 1, a schematic view of a system 10 is illustrated. Thesystem 10 is a computing network as is known to those skilled in theart. An individual operating a network terminal 11 may access a remotelylocated resource via a communications network 13. The communicationsnetwork 13 may be the Internet, the World Wide Web, a LAN, WAN, VPN.

The network terminal 11 may be any network appliance known to thoseskilled in the art, which includes means to communicate with theremotely located resource and means to transmit a request via thecommunications network 13: a personal computer, lap top computer, palmtop computer, hand held device, wireless text messenger cell phone, etc.

The remotely located resource may be a web page located on a web server15 or data that is located in a database 17, which is accessed by anapplication server 19 (via database server 119) that is connected to (orin communication with) the web server 15.

Alternately, the application server 19 and associated database 17 may beaccessed directly over the communications network 13, without the needof the web server 15. For example, an individual operating a personalcomputer (i.e. terminal 11) may access a remotely located resource viathe Internet (i.e. communications network 13) if the personal computerincludes means for communicating via the network 13 (e.g. a modem) andexecutable software for sending a request for the resource to theresource host.

The remotely located resource may be as simple as static HTML document.Alternately, the requested resource may comprise a small portion of alarger service, such as completing an online transaction, which requiresthe production of several responses that are particular to the givenuser's current session. The data included in these transactions aredynamic, not static; i.e., they are generated in response to the user'sparticular request. The requested data may reside in the database 17,which is accessible by the application server 19 via database server119. The user may simply require the raw data, or the data may beprocessed and the processed result is incorporated in the response tothe user's request. There are several ways by which the requested datamay be processed and or incorporated into a response.

Referring to FIG. 2, an expanded schematic view of the system 10illustrates one such way in which a request may be processed, whichemploys java web server and java server page (JSP) technology. The webserver 15 includes a java server page engine 21 and a servlet engine 23,which together process the requested resource (i.e. JSP 25) and generatea response that is returned to the terminal 11.

FIG. 3 illustrates schematically an expanded view of the requestedresource 25 and the generated response, a data output 27. A useroperating the terminal 11 requests a remotely located resource (the javaserver page 25) via the communications network 13. The web server 15running the JSP engine 21 receives the resource request and retrievesthe requested java server page 25, reads it and translates the JSPelements in to java code 29 (.java). The java code translation 29 isthen compiled into a java servlet 31 (.class) using a standard compileras is known to those skilled in the art. Next, the servlet 31 isexecuted using a standard API, such as servlet engine 23. As the servletruns, it processes input data 33 and generates the data output 27; i.e.,it processes the request and generates a response. The output 27 is thendirected to the terminal 11 via the network 13.

Referring to FIGS. 4 and 13, a system for hosting a computer executablemulti-tier application 191 for interaction over a network with a userinterface 11, the application 191 including an application presentationtier 171 and an application logic tier 181, and associated elements areillustrated according to a preferred embodiment of the presentinvention. The system comprises a first presentation template 65, thefirst template including a first presentation instruction for defining acorresponding first presentation element or output 79; a firstpresentation component 61 of the application presentation tier 171 forprocessing the first presentation instruction; and, a first directionelement 161 for linking the first presentation component 161 to thefirst template 65, wherein the first component 161 processes the firstpresentation instruction and generates the first presentation elementduring execution of the multi-tier application for subsequent deliveryto the user interface 11.

In a preferred embodiment, the system comprises a second presentationtemplate 67, the second template 67 including a second presentationinstruction for defining a corresponding second presentation element oroutput 79; and, a second direction element for linking the firstpresentation component 161 to the second template 67, wherein the firstcomponent 161 processes the second presentation instruction andgenerates the second presentation element or output 79 during executionof the multi-tier application for subsequent delivery to the userinterface 11.

In a still further embodiment, the system comprises a first functioncomponent 59 of the application logic tier 181 for processing an inputdatum 33; and, the first direction element further linking the inputdatum 33 to the first function component 59, wherein the first functioncomponent processes the input datum 33 and generates an output datum 27during execution of the multi-tier application. An output datapresentation instruction further defines the corresponding firstpresentation element or output to include the output datum 27.

Referring to FIGS. 4 and 15, a flowchart of a method for hosting acomputer executable multi-tier application 191 for interaction over anetwork with a user interface, the application 191 including anapplication presentation tier 171, is illustrated according to apreferred embodiment of the present invention. The method comprises thesteps of selecting a first presentation template, 65 the first template64 including a first presentation instruction for defining acorresponding first presentation element (step 100); selecting a firstpresentation component 161 of the application presentation tier 171 forprocessing the first presentation instruction (step 200); and, linkingthe first presentation component to the first template 65 (step 300),wherein the first component 161 processes the first presentationinstruction and generates the first presentation element or output 79during execution of the multi-tier application for subsequent deliveryto the user interface.

Referring to FIGS. 4 and 16, a flowchart of the additional steps of themethod of FIG. 15 is illustrated. The steps further comprise: selectinga second presentation template 67, the second template including asecond presentation instruction for defining a corresponding secondpresentation element or output 79 (step 101); selecting the firstpresentation component 161 for processing the second presentationinstruction (step 201); and, linking the first component 161 to thesecond template 67 (step 301), wherein the first component 161 processesthe second presentation instruction and generates the secondpresentation element or output 79 during execution of the multi-tierapplication 191 for subsequent delivery to the user interface.

In a preferred embodiment, the presentation templates 65,67 are computerreadable files of a file system and the presentation instructions aresuch as but not limited to: layout, style and format of the firstpresentation element. In a further embodiment, the presentationinstructions are written in a markup language selected from the groupcomprising such as but not limited to: HTML, HDML and WML.

The first presentation component 161 is a computer executable file. In apreferred embodiment, the computer executable file is a java bean.

The first presentation component 161 is linked to the first presentationtemplate 65 by a direction element 57. The direction element 57specifies the location of the first presentation template 65 and directsthe first presentation component 161 to the specified location. In apreferred embodiment, the direction element 57 is a first presentationcomponent tag 57 is such as but not limited to page Tag; control Tag;attribute Tag; producePage Tag; clear Tag; and interceptor Tag.

The first presentation component tag 57 is expressed as a directive of adirection module, which implements the multi-tier application. In apreferred embodiment, the direction module is a java server page 49.

Referring to FIGS. 4 and 17, a flowchart of the additional steps of themethod of FIG. 15 is illustrated, wherein the multi-tier application 191further includes an application logic tier 181. The steps furthercomprise selecting an input datum 33 (step 102); selecting a firstfunction component 59 of the application logic tier 181 for processingthe input datum 33 (step 202); and, linking the input datum 33 to thefirst function component 59 (step 302), wherein the first functioncomponent 59 processes the input datum 33 and generates an output datum27 during execution of the multi-tier application 191.

Referring to FIGS. 4 and 18, a flowchart of the additional steps of themethod of FIG. 17 is illustrated, wherein the first template furthercomprises an output data presentation instruction for further definingthe corresponding first presentation element to include the output datum27. The method comprises the additional step of: directing the firstpresentation component 161 to process the output datum presentationinstruction (step 403), wherein the first presentation component 161processes the output datum presentation instruction and generates thefirst presentation element or output 79 incorporating the output datum33 during execution of the multi-tier application 191.

In a preferred embodiment, the output datum presentation instructiondefines a control within which the output datum is presented such as butnot limited to Text field, Password field, Hidden field, Text area,Table, List box, Check box, Radio button, Image, Push button, Imagebutton, Submit button, Reset button, Link and Span.

The first function component 59 is a computer executable file. In apreferred embodiment, the computer executable file is a java bean.

The first function component 59 is linked to the input datum 33 by adirection element 55. The direction element 55 specifies the location ofthe input datum 33 and directs the first function component to thespecified location. In a preferred embodiment, the direction element 55is a first function component tag 55 such as but not limited to initTag; call Tag; prerequisite Tag; debug Tag; error Tag; getValue Tag; ifTag.

In a preferred embodiment, the first function component tag 55 isexpressed as a directive of a direction module, the direction moduleimplementing the multi-tier application. The direction module is a javaserver page 49.

Referring to FIG. 5, a further alternate embodiment of the system 10 isillustrated schematically as application server servlet system 200. TheJSP engine 21 resides on the application server 19. The servlet engine23 cooperates with the JSP engine 21 in the translation, compilation andexecution of the java server page 25. The remotely located resource inthe system 200 may include data located on the local database 17, whichis accessed directly by the application server 19 via database server119 and processed by the servlet 31. The output in this case is returnedto the user via another mechanism, such as e-mail.

Referring to FIG. 6( a), a schematic view of a java server page JSP 39as is known to those skilled in the art is illustrated. The JSP 39 is atext document that contains static template data (which can be expressedin any text based format, such as HTML, WML and XML) and JSP elements(which are interpreted by the JSP engine 21).

The static content, which defines the look and feel of the processedoutput, is created by writing those portions of the JSP 39 using markup(ML) statements 43. For example, if HTML is selected as the ML, then thetemplate portions of the JSP are scripted using HTML statements andsyntax.

The dynamic content is created by accessing the Java programminglanguage object properties. The dynamic elements of the JSP 39 typicallyinclude JSP directives 41, which pass information to a JSP engine 21,JSP tags 45, which may be implemented as standard tags or customizedtags that are used to for example instantiate a java bean on a server,and scriptlets 47, which are small scripts of java code that performfunctions not supported by the tags.

The JSP directives 41 may include page directives (which communicatepage specific information, such as buffer and thread information orerror handling), language directives (which specify the JSPs scriptinglanguage), include directives (which can be used to include an externaldocument in the page), and taglib directives (which indicate a libraryof custom tags that the page can invoke).

The JSP tags 45 are responsible for implementing most of the JSPprocessing. These include a number of standard tags (e.g., useBean,setProperty and getProperty). Custom tags may also be designed andimplemented for a specific purposes).

Referring to FIG. 6( b), a JSP 49 according to a preferred embodiment ofthe present invention is illustrated. In a preferred embodiment of thepresent invention, the JSP 49 does not contain any markup language (ML)statements 43, nor does it include Java scriptlets 47. All operationalor functional and presentation elements of the JSP 49 are saved asdiscrete function components and presentation components, respectively.The components 59 and 61 are accessed via respective custom functioncomponent tag extensions 55 and presentation component tag extensions57, which in turn are specified using a function component taglibdirective 51 and a presentation component taglib directive 53,respectively.

Thus, the java server pages 49, within the architecture of a servletclient application, assembled according to the present invention containonly JSP directives and custom tag extensions 55 and 57.

JSP Directives

<%@directiveName attribute=”value”%> Where: directiveName is thespecific directive name attribute is an attribute for this specificdirective A directive may have zero or more attributes. value is thespecific value for the specified attribute An attribute may have exactlyone value.

The JSP 49 directives take the following form:

The JSP 49 page Directive

In a preferred embodiment, all JSP processing pages 49 begin with thefollowing page directive:

<%@  page  session=”true”  buffer=”buffer  size  kb” autoFlush=”true”1    isThreadSafe=”true” errorPage=”.../errorPage.jsp” %> Where:.../errorPage.jsp is the URL to another JSP page that will be invoked ifan uncaught runtime exception is thrown If this is an error JSP page,then the following attribute should be included in the page directive:isErrorPage=”true”The JSP 49 taglib Directive

The taglib directive specifies custom tag extensions. The followingtaglib directives are specified in all JSP processing pages 49 (rightafter the page directive):

<%@ taglib uri=”/servlet/FCTagsClient.jar” prefix=”FC” %> <%@ tagliburi=”/servlet/PCTagsClient.jar” prefix=”PC” %>The JSP 49 include Directive

The include directive can be used to insert, inline, the content ofanother JSP processing page 49:

<%@ include file=”. . . /otherPage.jsp” %> Where: .../otherPage.jsp isthe path to another JSP page that will be included.

Function Components (FC):

Referring to FIG. 7, a logical view of the function component 59 isillustrated.

The function component 59 is a distinct, independent piece of businessfunctionality. Each function component 59 receives a set ofpre-requisite data 33, performs a processing function using the receiveddata 33 and returns a set of result data 27. In a preferred embodiment,every function component 59 exists as a Java class that is based on ageneric base class. When a client application requires a functioncomponent 59, it is simply instantiated using Java reflection based onthe logical name of the function component 59. The function component 59conforms to the specification of a Java Bean.

The Public Abstract Class FC is the generic definition for all functioncomponents 59. All specific function component 59 classes extend thisbase class. This abstract class provides a set of built-in functionalityinherited by all function component 59 classes as well as defining theset of functionality that must be implemented specifically within thefunction component 59 class itself.

The Public Class {ApplicationCategory} {Function}:

-   -   Any given function component 59 is defined further by a specific        class that extends the Function Component 59 class.    -   In a preferred embodiment, the naming convention for a specific        function component 59 class is {ApplicationCategory} {Function}        where:    -   {ApplicationCategory} is a short form indicating the application        category that the function component 59 belongs to (e.g. Order        for the Net*Order application category, Track for the Net*Track        application category, or General for the General application        category)    -   {Function} is a short but descriptive phrase indicating the        function of this specific function component 59 (e.g.        PerformProductSearch for a function component 59 that actually        performs a search of a catalogue and returns a series of        products)

Function Component Instances

A function component 59 is instantiated with a function component 59instance name so that multiple instances can be uniquely named. In apreferred embodiment, the function component 59 instance name is:

{ApplicationCategory} {Function}_{InstanceDescription} Where:{InstanceDescription} is a short descriptive reference for this specificinstance of the function component 59 e.g.OrderPerformProductSearch_OrderEntryPublic Method setInstanceDescription ( )

This method is used to set the instance description for the functioncomponent 59. This method is often called immediately afterinstantiation of the function component 59.

Public Method getInstanceDescription ( )

This method returns the instance description for the function component59.

Public Method getInstanceName ( )

This method returns the instance name for the function component 59.

Prerequisite Data 33 And Returned Result Data 27

In a preferred embodiment, all prerequisite data 33 and returned resultdata 27 are stored as instance variables. The name of the instancevariable is the name of the prerequisite data element itself. Inaddition there is a set and get method for each of these instancevariables which uses the same naming conventions. This allows theprerequisite data 33 to be referenced externally by using Javareflection. For example, if a function component 59 has a prerequisitedata element 33 named userID then there is an instance variable nameduserID that is set externally using the public method named setUserID(). In the case where this is also a returned result data 27 element,then the data 27 is returned using the public method getUserID( ). Inthe case of a returned result data element, there is a public getmethod.

Protected Method validate( )

The validate( ) method is called from within the execute( ) method,prior to actually executing any processing logic of the functioncomponent 59. If there is any missing or incorrectly set prerequisitedata 33, then the FC_EXCEPTION_PrerequisiteData FCException exception isreturned.

Public Method Execute( )

The execute( ) method provides the internal processing logic of thefunction component 59. Prior to performing any specific processing, allof the prerequisite data 33 is validated. As return result data 27 isproduced, it is stored into the respective instance variables. If anerror occurs during the execution of the processing logic, theappropriate FCException exception is returned.

Public Class FCException

This class represents an error that has occurred during either thevalidation of prerequisite data 33 or during the execution of theprocessing logic of a function component 59.

Public FC_EXCEPTION_PrequisiteData

This exception indicates that the prerequisite data 33 does not conformto the requirements defined by the function component 59 definition.Such an exception is typically caused by an error in the specific callto the function component 59.

Public FC_EXCEPTION_FCInternal

This exception indicates that there has been an unexpected error duringthe internal processing logic of the function component 59. Such anexception is typically caused by an error within the function component59 logic itself.

Public FC_EXCEPTION_ServerInternal

This exception indicates that there has been an unexpected error duringthe internal processing logic of the function component 59 involving thecall to a server. Such an exception is typically caused by an errorwithin the function component 59 logic itself or within the serverlogic.

Public FC_EXCEPTION_Exception

This exception indicates that an attempt was made to return an invalidfunction component exception. The FCException itself can only returnthis exception. Such an exception is caused by an error within thefunction component 59 logic itself.

Public FC_EXCEPTION_Assertion

This exception indicates that an assertion failed.

Other Exceptions

The function component 59 itself can define its own function componentexception by specifying its own exception identifier when the functioncomponent exception is constructed. The specific meaning of theexception is defined by the function component 59.

Public Method getExceptionID( )

This method returns the exception identifier.

Public Method getFailureReason( )

This method returns the failure reason.

Public Method toString( )

This method returns a printable version of the exception.

Function Component (FC) Tag Extensions:

The function components 59 are invoked using a set of function componenttag extensions 55.

The function component:init Tag

This tag initializes the page for function component 59 processing. In apreferred embodiment, this tag is the first function component customtag on every page where function component custom tags 55 are utilized.This tag has the following format:

[<functioncomponent:init classpath=”classpath” scope=”scope” />] Where:classpath is the classpath to search for when instantiating functioncomponents 59, scope is the default scope for the storage of functioncomponents 59 instantiated on the JSP 49. The scope can be any one ofthe following values: application, session or request. If the scope isnot specified, the default scope is session. e.g. session Both theclasspath attribute and the scope attribute are optional.The function Component: Call Tag

This tag 55 defines that a specific function component 59 is to beinvoked. This tag has the following format:

<functionComponent:call name=”functionComponentInstanceName”debugLevel = ”debugLevel” > dontResetAllData=”yes”scope=”scope”conditionalExecution=”true” > functionComponent-body</functionComponent:call> Where: functionComponentInstanceName is thefunction component 59 instance to invoke. If this function component 59instance has already been invoked within the current execution of thefunction, then it is reused. Otherwise this function component 59instance is created. e.g. OrderGet_OrderEntry debugLevel is the debuglevel for this specific function component 59 call, specified as high,medium or low dontResetAllData specifies that the resetAllData( ) methodof the function component 59 will not be called. Normally theresetAllData( ) method of the function component 59 will always becalled prior to the setting of any prerequisite data 33 for thisfunction component call. The resetAllData( ) method can act differentlythan simply using the empty attribute on all prerequisite data 33. Fornumeric values, using the empty attribute sets these values to 0 whereasthe resetAllData( ) method may in fact cause these values to be set tosome default value other than 0. The function component 59 defines thespecific behaviour of the resetAllData( ) method. When an functioncomponent 59 has multiple optional prerequisite data 33 elements and thefunction component 59 is used more than once in a session, it may bedesirable to reset all prerequisite data 33 on a subsequent call.However there may be a case where this is not the desired behaviour.This behaviour can be overridden using the dontResetAllData attribute.scope is the scope for the storage of this function component 59 (whichoverrides the setting for the page defined in the functionComponent:inittag). The scope can be any one of the following values: function,session or request. If not specified, the scope is defined by thefunctionComponent:init tag. e.g. session conditionalExecution=”true”this attribute indicates that the execution of this tag 55 isconditional upon the enclosing functionComponent:if tag currently havinga true value This tag 55 contains a body that includefunctionComponent:prerequisite and functionComponent:error tags asrequired. Only the name attribute is mandatory. Returned result data 27is accessible through a dataReference specification.The functionComponent:prerequisite Tag

This tag 55 defines one prerequisite data element 33 for the functioncomponent 59. This tag 55 must be defined within the body of afunctionComponent:call tag. This tag 55 has the following format:

<functionComponent:prerequisitetarget=”prerequisiteDataReference”value=”literalValue” source=”dataReference” optSource=”dataReference”empty=”booleanValue” /> Where: prerequisiteDataReference is either thesimple name of a prerequisite data element 33 of the function component59 or else a reference to a data element of a prerequisite data elementof the function component. In a preferred embodiment, the prerequisitedata reference begins with a reference to a prerequisite data element 33of the function component 59. If the target is simply the prerequisitedata element 33 itself, then the reference is just the name of the dataelement (e.g. ordered). If the prerequisite data element 33 is astructure, then the reference is the name of the data element structure,a dot (‘.’) and the element name of the structure. (If the element isitself a structure, then it can also be further qualified.) (e.g.userAttributes.firstName). literalValue is a hard-coded literal valuedataReference is a reference to dynamic data, The reference to dynamicdata follows the same specification as defined for data reference valuefor control tags. booleanValue is either true or false In a preferredembodiment, all of the attributes are mandatory except that only one ofvalue or source or optSource or empty may be specified. If optSource isspecified, then the dataReference can be a non-existent data reference.If empty=”true” is specified, then an appropriate value is passed to theset method. For a String attribute, an empty string is passed (i.e. “”).For numeric attributes, a zero (i.e. 0) is passed. For objectattributes, a null object is passed (i.e. null).The functionComponent:debug Tag

This tag 55 defines various debug information that can help withdebugging JSP pages. In a preferred embodiment, the tag 55 has thefollowing format:

<functionComponent:debugdebugLevel=”debugLevel” debugFile= ”debugFile”value=”literalValue” source=”dataReference” /> Where: debugLevel is thedefault debug level for all function components 59, specified as high,medium or low debugFile is the path to the file that will be used fordebug output (In a preferred embodiment, the first time a debug filespecification is encountered, that file is opened for appending. Allsubsequent debug file occurrences are ignored. If no debug file isspecified then debug output goes to the System. out stream.)literalValue is a hard-coded literal value dataReference is a referenceto dynamic data; the reference to dynamic data follows the samespecification as defined for data reference value for control tags. Allof the attributes are optional however only one of value or source maybe specified. The order of precedence is order followed by value.The functionComponent:error Tag

This tag defines the handling for one type of error for the functioncomponent 59. This tag must be defined within the body of afunctionComponent:call tag. This tag has the following format:

<functionComponent:errorname=”errorDescriptor”page=”.../errorPage .jsp”/> Where: errorDescriptor is a string that identifies a specificfunction component exception; e.g. PasswordMismatch. The functioncomponent 59 itself defines the meaning of a particular functioncomponent exception. The special value of “*” represents any exception(i.e. a default exception handler). .../errorPage.jsp is the URL toanother JSP page 49 that will be invoked if the specified runtime erroroccurs. The exception is available in the script variablefunctionComponentException within the error page. If the error page isspecified as the special value “ignore” then the exception is ignored.The error page can either be a specific value or a data reference. Thereference to dynamic data follows the same specification as defined fordata reference value for control tags.

In a preferred embodiment, all of the attributes are mandatory.

The functionComponent:getValue Tag

This tag is used to set a script variable with the value of a returnedresult data element of an function component. This tag has the followingformat:

<functionComponent:getValuesource=”dataReference”optSource=”dataReference” /> Where: dataReference is a reference to dynamic data. Thereference to dynamic data follows the same specification as defined fordata reference value for control tags. In a preferred embodiment, all ofthe attributes are mandatory except that only one of source andoptSource may be specified. If optSource is specified, then thedataReference can be a non-existent data reference. The script variableresultValue is set with the value of the specified returned result dataelement.The functionComponent:if Tag

This tag is used to conditionally execute other tag calls and toconditionally generate ML output. This tag has the following format:

<functionComponent:if >   conditional-functionComponent-body</functionComponent:if>

This tag acts as an IF-THEN block. ML output generated from tags withinthis block is included only if the value of the functionComponent:ifblock is true at the end of the block. The value of the block isinitialized to false at the start of the block. The value of the blockis set by calling the following Java method:

FunctionComponentIfTag.setIfValue (PageContext pageContext, BooleanifValue)

Normally the setIfValue( ) method would be called from within theexecute( ) method of an function component invoked by afunctionComponent:call tag inside the block of the functionComponent:iftag. It is possible to call the setlfValue( ) method multiple timeswithin the same block. However, it is the last call that determines thefinal setting for the block that is used to decide whether or not MLoutput generated within the block should be included in the generatedoutput page.

In addition, it is possible to conditionally execute various tags withinthe functionComponent:if block. If a tag contains the attributeconditionalExecute=“true” then that tag is only executed if the currentvalue of the functionComponent:if block is true. The following tags 55support the conditionalExecute attribute: functionComponent:call,presentation:control,presentation:producePage. The conditionalExecuteattribute can be added to other tags as required. It is possible tobuild a logical “AND” condition for a functionComponent:if block usingthe conditionalExecute attribute. Suppose there is a function component59 named “SetIfValueFunctionComponent” that takes the prerequisite data33 and determines whether or not to call the FunctionComponentIfTag.setIfValue( ) method. We can use the functionComponent:call tag toinvoke this function component twice at the beginning of thefunctionComponent:if block. On the second functionComponent:call weinclude the conditionalExecute attribute. This effectively makes thevalue of the functionComponent:if block the value of the firstSetIfValueFunctionComponent call ‘AND’ed with the value of the secondSetIfValueFunctionComponent call.

PRESENTATION TEMPLATES (PT):

Referring to FIGS. 8 (a) and (b) and 9, the presentation template (PT)61 is illustrated schematically according to a preferred embodiment ofthe present invention. A set of PT 61 files defines the “look and feel”of a client application, each PT 61 consisting of a series of MLstatements that defines a template for a presentation element or outputpage 79 or portion of an output page 79 of the client application. Theset of PT 61 files for the client application are language (e.g.,French, English) and format (e.g., HTML, HDML) specific.

In a preferred embodiment, the PT 61 files take one of two forms.Referring to FIG. 8( a), a first or static PT 65 is illustrated. Thestatic PT 65 consists solely of ML statements that define thepresentation elements of the output page 79 or portions thereof. As theJSP 49 is processed, the ML statements of the static PT 65 are used todefine a static portion of the output page 79, such as the header orfooter; i.e., those portions of the output page 79 that are common toall output pages of the client application.

Referring to FIGS. 7 and 8( b), a second or dynamic PT 67 isillustrated. The dynamic PT 67 consists of ML statements that define thepresentation elements of the output page 79 or portion of the outputpage 79. It also includes at least one control 63, which provides a linkto the data output 27 that is generated by the FC 59. As the JSP 49 isprocessed, the ML statements of the dynamic PT 67 defines an output thatincorporates the data output 27 of the FC 59. For example, the outputpage 79 or portion thereof may display the order details of a purchaseorder (e.g., a list of items purchased) in a table. The data output ofthe FC 59 may be the list of items purchased, which are displayed in anHTML table (i.e., control 63) having a presentation format defined bythe PT 67.

In a preferred embodiment, a well-defined hierarchical file organizationis used for the deployment of presentation template files. The hierarchyconsists of the following levels, in order:

-   -   Application root—This is the root of the hierarchy for this        specific application.    -   Format—This level organizes files by format (e.g. divisions of        html, hdml).    -   Language—This level organizes files by language locale (e.g.        divisions of en_US, en_CA, fr_CA).    -   Application specific level(s)—This (these) level(s) may be        defined as required for the specific application.

The individual presentation template files 61 are located within theapplication specific level(s) if they are specified or else they arelocated within the language level.

In a preferred embodiment, the common elements of the “look and feel”are segmented into separate presentation template files 61. For example,if all the pages of an application have a common header and commonfooter, then each of these sections should be extracted into their ownfiles respectively so that they can be “included” by reference ratherthan having their contents copied in all of the pages of theapplication. Accordingly, it is recognized that the courier templatefiles 61 and associated FC tags 59 and PC tags 57 can be reused togenerate the pages of the application. For example, one of the templates61 could represent one line of the multi-line table, with theappropriate PC tags 57 and FC tags 59 directing the inserted tablecontent for each invocation of the line template 61.

Using this file organization model, it is possible to determine thephysical path to an ML PT61 file given the application root path, thefile format, the language, and the file name including any applicationspecific levels.

For example, an application may have one application specific leveldefined that has the following divisions: common, orderEntry andorderHistory. The application itself has a series of pages 49 that haveto do with entering and processing an order and another set of pages 49that have to do with selecting and viewing order history. The set of MLpresentation template files 61 may be organized in the following way:

.../orderApplication/html/en_CA/common/header.html.../orderApplication/html/en_CA/common/footer.html.../orderApplication/html/en_CA/orderEntry/search.html.../orderApplication/html/en_CA/orderEntry/entry.html.../orderApplication/html/en_CA/orderEntry/submit.html.../orderApplication/html/en_CA/orderHistory/search.html.../orderApplication/html/en_CA/orderHistory/display.html with othersets of files under: .../orderApplication/html/fr_CA/....../orderApplication/hdml/en_CA/... .../orderApplication/hdml/fr_CA/...

The individual ML presentation template files 61 can be designed usingan appropriate

WYSIWYG editor such as HomeSite for HTML files as developed byMacromedia of San Francisco, Calif. Any other suitable editor known tothose skilled in the art may be employed. The ML presentation templatefiles 61 themselves contain “pure” markup language (e.g. HTML).

The ML PT files 61 represent pages that can contain dynamic content;e.g. ML PT 67. Any dynamic content must be placed inside controls 63located on the page. Each markup language has its own set of controls.Each control 63 has an identifier (i.e. in HTML, id=“idValue”) keyworddefined in order for the dynamic content to be inserted into the control63. In the ML file, the control may have dummy data. This dummy data isuseful for display purposes during the design phase of the ML file.However, this dummy data is removed automatically when the dynamic datais inserted into the control. In the case of an HTML based MLpresentation template dynamic file 67, any of the following controlswill be considered for dynamic data insertion so long as each controlhas a unique value for the identifier keyword (i.e., id=“idValue”): Textfield, Password field, Hidden field, Text area, Table, List box, Checkbox, Radio button, Image, Push button, Image button, Submit button,Reset button, Link and Span. In alternate embodiments, the ML file maybe composed in any other markup language known to those skilled in theart, such as HDML or WML.

Presentation Component (PC):

Referring to FIG. 4, the presentation component (PC) 161 is illustratedschematically. The PC 161 is a distinct, independent piece ofpresentation functionality. Each presentation component 161 processesthe corresponding presentation element. In a preferred embodiment, everypresentation component 161 exits as a Java class that is based in ageneric base class. When a client application requires a presentationcomponent 161, it is simply instantiated using Java reflection based onthe logical name of the presentation component 161. The presentationcomponent 161 conforms to the specification of a Java Bean.

Presentation Component (PC) TAG Extensions:

The presentation component files 161 are involved using a set ofpresentation component tag extensions 57. The presentation componentfile custom tag extensions 57 provide the linkage between the controls63 in the presentation files 67, the dynamic data 27 and thepresentation component 161 in the JSP page 49. In addition, theseextensions 57 also provide the ability to generate a subsequent displaypage 79.

The presentation:page Tag

This tag defines that a specific presentation component file 161 is tobe used in the current processing page 49. This tag has the followingformat:1

<presentation:page name=”presentationName” root=”rootPath”source=”fileName” value=”fileName” format=”presentationFormat”language=”languageSpecification” absolute=”true” /> Where:presentationName is the unique name that this presentation page will bereferenced by within this processing page 49 rootPath (optional) is theroot path of the file fileName is the file name including anyapplication specific level name presentationFormat is the format of thepresentation file 61, which must be one of the following values: html,hdml or wml. languageSpecification (optional) is the language of thecontent of the presentation file 61, which if specified, must be one ofthe following values: en_CA, fr_CA and so on. In a preferred embodiment,the name and format attributes are mandatory. Exactly one of the sourceor value attributes must be specified. Each of the attributes exceptvalue can be directly specified as a value or else can be a reference(i.e. dataReference) to dynamic data. The path to the presentation fileis considered to be relative unless the absolute attribute is specifiedas true.The presentation:control Tag

This tag links a control 63 from a dynamic presentation template file 67to the source of the control's dynamic data and the presentationcomponent 161. This tag is used when the type of control 63 is supportedfor the particular format of the dynamic presentation template file 67.In a preferred embodiment, this tag has the following format:

<presentation:control name=”controlName” type=”controlType”parentPresentation=”parentName”value=”literalValue”         source=”dataReference”optSource=”dataReference” empty=”booleanValue”id=”identifier” conditionalExecution=”true” /> Where: controlName is theunique name that this control will be referenced by controlType is thespecific type of the control. If HTML is the selected ML, then the HTMLcontrols include input (requires attribute type set to text for textfield, set to password for password field, set to hidden for hiddenfield, set to button for push button, set to image for image button, setto submit for submit button, set to reset for reset button, set tocheckbox for checkbox, set to radio for radio button), textarea, table,select (list box), img (image), a (link) or span. parentName is the nameof the parent containing this control which is either a presentationpage or another control. If a control is specified that is immediatelycontained in a page, then the value is the presentation name, a dot(‘.’) and the control name. If a control is specified that is withinanother control that is immediately contained in a page, then the valueis the presentation name, a dot (‘.’), the immediate control name, a dot(‘.’) and the control name. There is no limit to the embedding ofcontrols within controls. literalValue is a hard-coded literal valuedataReference is a reference to dynamic data The type of data referencedby this attribute must be compatible with the control type. The dynamicdata reference can be either a reference to keyword-value paired datadefined for this processing page or servlet request or else a referenceto returned result data from an application component. If the value of akeyword-value paired data is a simple value, then the reference issimply the keyword itself. e.g. orderNumber If the value of akeyword-value paired data is a structure, then the reference is thekeyword, a dot (‘.’) and the element name of the structure. (If theelement is itself a structure, then it can also be further qualified.)e.g. orderHeaderAttr.orderStatus A returned result data referenceincludes the function component 59 instance name, a dot (‘.’) and thename of the returned result data element. e.g.OrderGet_OrderEntry.orderID If the returned result data element is astructure and the desired dynamic data 27 is an element of thestructure, then the returned result data element is qualified by a dot(‘.’) and the element name. (If the element is itself a structure, thenit can also be further qualified.) e.g.OrderGet_OrderEntry.orderHeaderAttr.orderStatus If the dynamic datareference begins with the character “@” then it is an implicit indirectreference. In this case once the returned result data element has beendetermined, then it is itself considered to be a dynamic data referencethat is then re-evaluated by applying the rules stated above. (If thereturned result data element that is subsequently considered to be adynamic data reference also begins with the character “@” then it isalso an implicit indirect reference and the evaluation process beginsall over again.) booleanValue is either true or false identifier(optional) is the identifier of the control in the presentation file Thecontrol in the dynamic presentation file 67 must have an equivalentid=”identifier”attribute. If the identifier is not specified in thepresentation:control tag, then an attribute with name id must be set tothe value identifier in a presentation:attribute tag.conditionalExecution=”true” this attribute indicates that the executionof this tag is conditional upon the enclosing applicationcomponent:iftag currently having a true value The name, type and parentPresentationattributes are mandatory. Only one of the value, source or optSource orempty attributes may be specified. If optSource is specified, then thedataReference can be a non-existent data reference. The specifiedattribute provides the body content for the control in the ML file. Ifnone of these attributes are specified then no body content is replacedin the ML file.The presentation:attribute Tag

This tag specifies a specific attribute for a specific control 63. Thistag must be defined within the body of a presentation:control tag. Thistag has the following format:

<presentation:attribute name=”attributeName” value=”literalValue”source=”dataReference” optSource=”dataReference” empty=”booleanValue” />Where: attributeName is the name of the attribute to set literalValue isa hard-coded literal value dataReference is a reference to dynamic databooleanValue is either true or false All of the attributes are mandatoryexcept that only one of value or source or optSource or empty may bespecified. If optSource is specified, then the dataReference can be anon-existent data reference.The presentation:producePage Tag

This tag defines that output for a display page is to be produced basedon the specified presentation template file 61 after first populatingall dynamic content into the PT. The output is generated at the timethat the tag is encountered in the processing file 49; i.e., duringexecution of the muli-tier application. If there are multipleproducePage tags encountered, then the generated display page 79 willcontain the concatenation of the output from each of the produce Pagetags in the order that they were encountered within the processing file49. This tag has the following format:

<presentation:producePage page=”PresentationPageName”conditionalExecution=”true” /> Where: PresentationPageName is the nameof the presentation file 61 to produce output for The presentation file61 must have been previously defined by a presentation:page tag.conditionalExecution=”true” this attribute indicates that the executionof this tag is conditional upon the enclosing application component:iftag currently having a true value The page attribute is mandatory.The, presentation:clear Tag

This tag clears the JSP 49 output buffer. It is typically used to clearout the empty lines that the JSP server puts in around the XML tagsbefore any content is generated. In HTML, this data is ignored, butplain text documents should not have these extra lines. The tag has noattributes.

The presentation:interceptor Tag

This tag is a body tag that intercepts the output of its body andinserts it into the resultValue page variable and optionally copies itto the page output. This tag has the following format:

<presentation:interceptor interceptEnabled=”booleanValue”duplicateOutput=”booleanValue” /> Where: interceptEnabled is anexpression that, if true, enables the interceptor duplicateOutput is anexpression that, if true, copies the intercepted output to the enclosingpage The interceptEnabled attribute is mandatory; the duplicateOutputattribute is optional.

Defining The Processing Logic For a Servlet Client Application UsingProcessing Files

Referring to FIGS. 4, 6(a), 6(b), 7, 8(a), 8(b) and 9, the processinglogic of a JSP 49 in a servlet client application is illustratedschematically according to a preferred embodiment of the presentinvention. The processing logic for a servlet client is defined in a setof JSP 49 processing files. A processing file performs two distinctprocessing roles.

First of all, a processing file 49 provides the ability to invokefunction components 59 that implement specific processing functionality.The specific processing functionality includes processing input data 33and providing output data 27.

The processing file 49 also defines the links 69 between the controls 63that are defined within the dynamic presentation template files 67 andthe dynamic data itself. After all the specific processing functionalityhas been completed for a specific output page 79 and all of the dynamicdata 27 has been generated, the next display page 79 can be produced bypopulating the dynamic data into the dynamic presentation files 67 andgenerating the presentation element with the presentation component 161.

In a preferred embodiment, a processing file 49 is implemented usingJavaServer Pages (JSP). In order to make the processing filesuser-friendlier, two sets of custom JSP tag extensions have beenintroduced. The function component (FC) custom tags 55 provide theability to invoke function components 59. The presentation file customtags 61 provide the linkage between dynamic data and the controls 63 inthe presentation files and also provide the ability to generate thedisplay page 79 with the presentation component 161.

A client application infrastructure 97 defines the classes whichimplement the customJSP FC tag extension 55 and PC tag extension 57libraries that together make up the functional framework of the clientapplication 71. The classes support the client application's functioncomponents 59 presentation components 161.

The infrastructure 97 provides the interface between function components59 and the specific application clients. It also provides suitableconnection points for servlet GUIs, applet GUIs and direct programmableinterfaces. The infrastructure further provides a set of classes, whichimplement the custom JSP extension libraries responsible for supportingthe client application's presentation components 161.

Referring to FIGS. 10 and 11, a logical view of a client application 71assembled in accordance with a preferred embodiment of the presentinvention is illustrated. For illustrative purposes a servlet clientapplication is described. The servlet engine 23 is invoked by the userentering the URL of the starting JSP 49 of the application 71 fromwithin a browser on terminal 11.

The servlet client 71 logically consists of a series of java serverpages 49, with each page defining a portion of the processing logic theclient application 71. Each page 49 has one or more associatedpresentation templates 61 providing the “look and feel” of the page.Each page 49 also has one or more associated function components 59providing its processing logic and presentation components 161 providingits presentation logic.

At any specific point in the execution of the client application 71, theuser operating terminal 11 is viewing a page in a local browser windowand interacting with it. The user enters information and then causes(e.g. by “pushing” a button) data from the page to be returned to theweb server 15 along with a pointer to the next page 49 of the clientapplication 71. The user's data is returned to the web server 15 in theform of a set of keyword-value pairs 73.

At this point, the next page 49 of the client application 71 isprocessed, the output data 27 of which is generated by the PC 161 andused in the generation of a new viewing page 79, which is sent back tothe user's browser window on terminal 11 and the whole cycle beginsagain.

In summary, each page 49 of a servlet client application 71:

-   -   receives as input, a set of keyword-value paired data 73    -   performs a processing step 77    -   Generates a new display page 79 for the user operating terminal        11 containing all of the required embedded programming        constructs to both redirect control flow to a subsequent page 49        and to return keyword-value paired data 73 to that subsequent        page.

In alternate embodiments, an applet client 93 or a direct programmableinterface client 95 may be assembled. (FIG. 13)

The applet client 93 is a Java Swing-based interface to clientapplications 71 running on terminal 11. The user on terminal 11interacts directly with the application as it is running locally. Theclient application 71 communicates across the communications network 13(e.g., the Internet) with the Net*Suite servers via a CORBA interface97. Responses are written directly to the screen using Java Swing GUIcomponents.

The direct programmable interface is another mechanism that uses theapplications. A direct programmable interface client 95 is a specificset of Java code. The direct client 95 instantiates a set of functioncomponents 59 to provide the processing logic for the client application71. The direct client 95 sets prerequisite data 33, invokes the execute()methods and gets returned data 27 for each function component 59instance as appropriate.

A client using the direct programmable interface provides its own GUI ifone is required. The function component 59 linkages are “hard coded”within the client logic itself to define the application.

Illustrative Example

Referring to FIG. 12, the use of FC taglib directives 51, FC tags 55 FCs59, PC taglib directives 53, PC tags 57 and PCs 161 to generate anoutput page 79 is illustrated by way of example according to a preferredembodiment of the present invention. In the present example, there is anorder entry application that includes an administrative step to approveorders. In this case, an order is submitted after the order is approved.

For this example, it is assumed that the previous JSP 49 selected theorder and an order identifier (orderID) FC 59 is available as a returnedresult from an OrderSelect FC 59 executed on the previous JSP 49.

The current JSP 49 is the OrderSubmit page. The processing logic forthis page involves calling a FC 59 (OrderGet) that will retrieve theorder details 83 for the selected order. In this case, the resultingoutput page 79 to be returned to the user's browser window will displaythe order number 81 and the order details 83. If the order details 83are not available, then the FC 59 returns a FC_EXCEPTION_1 exception. Inthis case the application will jump to an error JSP (noOrderError.jsp).Any other exceptions are handled by forwarding to a general error JSPpage (error.jsp).

The PTs 61 that define the layout for output page 79 utilize a PT header85 (OrderApplicationHeader.html) and PT footer 87(OrderApplicationFooter.html) (in HTML format) that is common across allpages in this application. There is no dynamic data inserted within thePT header 85 or PT footer 87, they are examples of static presentationtemplates 65.

The PT main body 89 of the current page is from the OrderSubmit HTMLfile. This file contains a text field (read only) that will display theorder number 81. This control is labeled with id=OrderNumField. Theorder details 83 will be displayed in table format using a tablecontrol. The table control is labeled with id=OrderDetails. Finally,there is a submit button 91 on the page which will invoke a subsequentJSP page (submit.jsp) which will actually submit the order. The PT mainbody 89 is an example of the dynamic PT 67.

The PT HTML files 85, 87 and 89 provide the layout template for thedisplay page 79 generated from the JSP 49, which is generated by the PC161.

The JSP 49 for this part of the application is as follows.

2  <!--************************************************************* 3 This page is used by an administrator to submit an order. 4 *****************************************************************--> 56  <%@ page session=”true” buffer=”64kb” autoFlush=”true” 7   isThreadSafe=”true” errorPage=”.../errorPage.jsp” %> <%@ tagliburi=”/servlet/FunctionComponentTagsClient.jar” prefix=”applicationcomponent” %> 8  <%@ tagliburi=”/servlet/PresentationComponentTagsClient.jar” prefix=”presentation”%> 9  <functionComponent:init > 10 <!-- Create and OrderGet functioncomponent and execute it using the results from a function component(OrderSelect) executed on a previous JSP page. --> 11<functionComponent:call name=”OrderGet_OrderEntry” > 12  <functionComponent:prerequisite target=”ordered” 13    source=”OrderSelect_OrderEntry.orderID” /> 14  <functionComponent:errorname=”NoOrder”page=”noOrderError.jsp” /> 15</functionComponent:call> 16 <!--Define the header presentation. Thereis no dynamic data in the header presentation.--> 17 <presentation:pagename=”header” source=”OrderApplicationHeader” 18   language=”en_CA”format=”html” /> 19 20 <!-- Define the body presentation. Thispresentation contains dynamic data. The dynamic data must be connectedto the presentation. --> 21 <presentation:page name=”body”source=”OrderSubmit” 22   language=”en_CA” format=”html” /> 23<presentation:controlname=”OrderNumField”type=”span”id=”OrderNumField ”24 parentPresentation=”body”source=”OrderGet_OrderEntry.orderNum” /> 25  <presentation:control name=”OrderDetails” type=”table”id=”OrderDetails” 26parentPresentation=”body”source=”OrderGet_OrderEntry.orderDetailTable”/> 27 28 <!--Define the footer presentation. There is no dynamic data inthe footer presentation. --> 29 <presentation:page name=”footer”source=”OrderApplicationFooter” 30   language=”en_CA” format=”html” />31 32 <!-- Now that all the elements of the page are available, 33   thepage itself can be produced. --> 34 <presentation:producePagepage=”header” /> 35 <presentation:producePage page=”body” /> 36<presentation:producePage page=”footer” />

Referring to FIG. 13, an expanded schematic view of the system 10 andthe processed outputs of the client application 71 are illustratedaccording to a preferred embodiment of the present invention. A networkuser operating the network terminal 11 requests the remotely locatedresource (JSP 49) via the network 13.

The JSP 49 includes FC tag library directives 51, which specify thecustom FC tags 55 that may be used by the servlet engine 23 whenprocessing the user's request, and PC tag library directives 53, whichspecify the custom PC tags 57 that may be used by the servlet engine 23when assembling the output page 79 that is returned to the user atterminal 11. The JSP 49 further includes FC tags 55 that are used toinvoke their corresponding FCs 59 and PC tags 57 that provide links tothe PCs 161.

The FC tag 55 may be used to call its corresponding FC 59. It does thisby specifying the FC 59 to be invoked (by “name”). A further FC tag 55defines the prerequisite or input data 33 and provides a reference 101to the “source” of the input data 33. In the present example, the inputdata 33 is located in the database 17, which is accessed by theapplication server 19 via database server 119. Thus when the FC 59 isexecuted, it requests and receives the input data 33 from the database17 via the application server 19. The data is then processed by the FC59 and the data output 27 is generated.

The PC tag may be used to call its corresponding PC 161. It does this byspecifying the PC 161 to be involved (by “name”). A reference is alsoprovided to the “source” of the PT 61. Thus, when the PC 161 isexecuted, it processes the presentation instructions in the presentationtemplate 61 and generates a corresponding presentation element or output79.

The PC tags 57 may refer to one of two types of PTs 61; static PCs 65and dynamic PTs 67. The PTs 65 and 67 are referred to by name andlocation or source. The static PTs 65 are ML files that include MLstatements that define presentation elements of a portion of the outputpage 79. The static PTs 65 neither include references to nor do theyincorporate the output data 27 that is generated by the FC 59 duringprocessing by the PC 161. They are generally reserved to defining thoseelements of the output page 79 that are common to all output pages 79 ofthe client application 79, such as the header or footer, although theiruse is not limited to this role.

The dynamic PTs 67 are also ML files that include ML statements thatdefine the presentation elements of a portion of the output page 79.However, they also include at least one control 63, which provides thereference or link 69 to the output data 27 that is generated by the FC59. The PC tags 57 that refer to the dynamic PTs 67 include, in additionto the name and “source” of the dynamic PT 67, a reference to the typeof control 63 to be included in the portion of the output page 79 and areference or direction 103 to the “output_data_27” that is to beincorporated in the control 63 during processing by PC 161.

Once the servlet engine 23 has executed the compiled java servlet 31 andprocessed the user's request, it generates the output page 79, theportions of which being defined by the PTs 65 and 67. It should berecognised that the JSP 49 includes a number of Pts 61, each responsiblefor defining a portion of the output page 79. These PTs 61 can bereusable, such that the same PTs 65, 67 can be linked to differentlyconfigured PC tags 57. For example, the PT 67 can be coupled by twodifferent controls having reference 69 to two different output data 27.Therefore, this would result in two tables in the output page 79 havingtwo dissimilar body contents dictated in part by the differing contentsof the two output data 27.

Client Application Infrastructure:

Referring to FIG. 14, the overall architecture of a client applicationassembled using a series of function components 59 is illustrated. Forillustrative purposes, the servlet client 75, the applet client 93 andthe direct programmable interface client 95 are all depicted interactingwith the FCs 59 via an alternate embodiment of the client applicationinfrastructure 97. The servers 19 implement, for example, the CORBA orEJB interface 99 for the client application 71 to use. Specific server19 calls are made from within a FC 59 during execution of the clientapplication 71 processing logic.

The client application infrastructure 97 defines the classes whichimplement the custom JSP FC tag extension 55 and PC tag extension 57libraries that together make up the functional framework of the clientapplication 71. In a preferred embodiment, one set of classes implementsthe custom JSP extension libraries responsible for supporting the clientapplication's function components 59 (the function componentinfrastructure), and a second set of classes implements the custom JSPextension libraries responsible for supporting the client application'spresentation components 161 (the presentation component infrastructure).

Function Component Infrastructure (FCI):

The FC 59 infrastructure provides the interface between functioncomponents 59 and the specific application clients: servlet client 75,applet client 93, DPI client 95. It provides suitable connection pointsfor servlet GUIs, applet GUIs and direct programmable interfaces. The FCInfrastructure provides a set of classes, which implement the custom JSPextension libraries responsible for supporting the client application'sfunction components 59. These classes include the Function ComponentInitTag, FunctionComponentInitTagExtraInfo, FunctionComponentCallTag,FunctionComponentCallTagExtraInfo, FunctionComponentPrerequisiteTag,FunctionComponentDebugTag, FunctionComponentErrorTag,FunctionComponentGetValueTag, and theFunctionComponentGetValueTagExtraInfo.

Public Class Function Component InitTag

This class implements the custom JSP tag extension library forinitializing the function component custom tags 55. This tag exists todefine variables in the FunctionComponentInitTagExtraInfo class.

Public Method doStartTag ( )

Since there is no support for content within this tag, this methodsimply returns SKIP_BODY.

Public Method doEndTag( )

There is no specific processing required. The value EVAL_PAGE isreturned.

Public Class FunctionComponentInitTagExtraInfo

This class creates all of the scripting variables for the functioncomponent tags 55.

Public Class FunctionComponentCallTag

This class implements the custom JSP tag extension library for functioncomponent 59 calling support.

PUBLIC get/Set Methods

In a preferred embodiment, every attribute of the tag 55 must have anassociated get and set method. In particular, the following methods arecreated.

.getName( ),setName( ) .getDontResetAllData( ),setDontResetAllData( ).getDebugLevel( ),setDebugLevel( )Private Method setFunctionComponentInstance( )

This method saves the current function component 59 instance. Thefunction component 59 instance is set by the functionComponent:call tagsince it will be retrieved by the functionComponent:prerequisite tag andthe functionComponent:error tag.

Protected Method getFunctionComponentInstance( )

This method saves the current function component 59 instance.

Protected Method setFunctionComponentException( )

This method saves a function component exception name and page that wasspecified by a functionComponent:error tag. The set of exceptions arestored in a hashTable where the key is the exception name and the valueis the exception page.

Private Method getFunctionComponentException( )

This method returns the exception page for the named exception or nullif no page was specified.

Public Method doStartTag( )

The function component 59 name is parsed and separated into the classname and the function component instance description. The functioncomponent 59 is then instantiated and the instance description is set.The function component instance name and object reference are saved in ahash table that is part of the session context. In addition, thefunction component instance itself is saved using thesetFunctionComponentInstance( ) method.

Prerequisite data 33 and exception handling is set within the body ofthis tag. Actual invocation of the function component 59 is done by thedoEndTag ( )method after the body has been processed.

This tag requires a body therefore this method simply returns EVAL BODYTAG.

Public Method doAfterBody( )

If there is any body content, then it should be appended to the bufferedoutput for the page.

No iteration over the body is required; therefore this method simplyreturns SKIP_BODY.

Public Method doEndTag( )

Any buffered output for the page should be written.

All of the prerequisite data 33 must have been set byfunctionComponent:prerequisite tags in the body.

The execute( ) method of the function component 59 is invoked.

If an exception is thrown, then it must be interpreted in the followingmanner. If there was an error descriptor attribute set for theexception, then the exception should be saved in thefunctionComponentException script variable and the request forwarded tothe defined JSP 49. In this case the value SKIP_PAGE is returned. In allother cases, including when no exception was thrown, the value EVAL_PAGEis returned.

Public Class FunctionComponentCallTagExtraInfo

This class implements the scripting variable definition for thefunctionComponentException that is set in the case that an exception(defined by the functionComponent:error tag) is handled for thefunctionComponent:call tag.

Public Class FunctionComponentPrerequisiteTag

This class implements the custom JSP tag 55 extension library forfunction component 59 prerequisite data 33 setting support.

Public get/set Methods

Every attribute of the tag has an associated get and set method. Inparticular, the following methods are created.

.getTarget( ),setTarget( ) .getSource( ),setSource( )

The type of each of this attribute is String rather than the actual typeof the prerequisite data 33.

.getValue( ),setValue( ) .getEmpty( ),setEmpty( )Public Method doStartTag( )

If this tag is not within a functionComponent:call tag, than anappropriate JspTagException is thrown. The function component 59 objectitself can be retrieved using the getFunctionComponentInstance( ) methodof the functionComponent:call tag handler. Since there is no support forcontent within this tag, this method simply returns SKIP_BODY.

Public Method doEndTag( )

Setting the target data element is done using reflection on the functioncomponent 59 class.

If the empty attribute is set then an empty value is used for the setmethod. If the value attribute is set then it provides the literal valueto use for the set method. Otherwise the source attribute must beinterpreted to get the value to use for the set method.

The interpretation of the source attribute involves the following steps.

-   -   Separate the base name (everything to the left of the first “.”        if there is one) from the qualification path (everything to the        right of the first “.” if there is one)    -   If the base name is a script variable name    -   Then lookup the script variable name value    -   Else if the base name is a servlet request parameter name    -   Then lookup the servlet request parameter name value    -   Else the base name must be a function component 59 instance name    -   Lookup the function component 59 instance name to get the        function component 59 instance object    -   If there is a qualification path    -   Then evaluate the qualification path by calling get methods on        each of the elements of the qualification path    -   Now there should be a value for the prerequisite data element    -   The value EVAL_PAGE is returned.

Public Class FunctionComponentDebugTag

This class implements the custom JSP tag extension library for functioncomponent debug support.

Public Get/Set Methods

In a preferred embodiment, every attribute of the tag has an associatedget and set method. In particular, the following methods are created.

.getDebugLevel( ),setDebugLevel( ) .getDebugFile( ),setDebugFile( ).getValue( ),setValue( ) .getSource( ),setSource( )Public Method doStartTag( )

Since there is no support for content within this tag, this methodsimply returns SKIP_BODY.

Public Method doEndTag( )

Setting the target data element is done using reflection on the functioncomponent class.

If the empty attribute is set then an empty value is used for the setmethod. If the value attribute is set then it provides the literal valueto use for the set method. Otherwise the source attribute must beinterpreted to get the value to use for the set method.

The interpretation of the source attribute involves the following steps.

-   -   Separate the base name (everything to the left of the first “.”        if there is one) from the qualification path (everything to the        right of the first “.” if there is one)    -   If the base name is a script variable name    -   Then lookup the script variable name value    -   Else if the base name is a servlet request parameter name    -   Then lookup the servlet request parameter name value    -   Else the base name must be a function component 59 instance name    -   Lookup the function component 59 instance name to get the        function component 59 instance object    -   If there is a qualification path    -   Then evaluate the qualification path by calling get methods on        each of the elements of the qualification path    -   Now there should be a value for the prerequisite data element    -   The value EVAL_PAGE is returned.

Public Class FunctionComponentErrorTag

This class implements the custom JSP tag extension library for functioncomponent 59 error support.

Public Get/Set Methods

Every attribute of the tag must have an associated get and set method.In particular, the following methods are created.

.getName( ),setName( ) .getPage( ),setPage( )Public Method doStartTag ( )

If this tag is not within a functionComponent:call tag, than anappropriate JspTagException is thrown. The function component 59 objectitself can be retrieved using the getFunctionComponentInstance( ) methodof the functionComponent:call tag handler. Since there is no support forcontent within this tag, this method simply returns SKIP_BODY.

Public Method doEndTag( )

Defining the error is done by calling the setFunctionComponentException() method of the functionComponent:call tag handler.

The value EVAL_PAGE is returned.

Public Class FunctionComponentGetValueTag

This class implements the custom JSP tag extension library for gettingfunction component 59 returned result data values.

Public Get/Set Methods

In a preferred embodiment, every attribute of the tag has an associatedget and set method. In particular, the following methods are created.

.getSource( ), setSource( )

Public Method doStartTag( )

Since there is no support for content within this tag, this methodsimply returns SKIP_BODY.

Public Method doEndTag( )

Setting the target data element is done using reflection on the functioncomponent class.

If the empty attribute is set then an empty value is used for the setmethod. If the value attribute is set then it provides the literal valueto use for the set method. Otherwise the source attribute is interpretedto get the value to use for the set method.

The interpretation of the source attribute involves the following steps.

-   -   Separate the base name (everything to the left of the first “.”        if there is one) from the qualification path (everything to the        right of the first “.” if there is one)    -   If the base name is a script variable name    -   Then lookup the script variable name value    -   Else if the base name is a servlet request parameter name    -   Then lookup the servlet request parameter name value    -   Else the base name must be a function component 59 instance name    -   Lookup the function component 59 instance name to get the        function component 59 instance object    -   If there is a qualification path    -   Then evaluate the qualification path by calling get methods on        each of the elements of the qualification path    -   Now there should be a value for the prerequisite data element    -   The value EVAL_PAGE is returned.

Public Class FunctionComponentGetValueTagExtraInfo

This class implements the scripting variable definition for theresultValue that is set for the functionComponent:getValue tag.

Presentation Component Infrastructure (PCI):

The PC 161 Infrastructure provides a set of classes, which implement thecustom JSP extension libraries responsible for supporting the clientapplication's presentation components 161. These classes include thePresentationPageTag, Presentation Control Tag, PresentationAttributeTag,and the PresentationProducePageTag.

Public Class PresentationPageTag

This class implements the custom JSP tag extension library forpresentation component 161 support.

Public Get/Set Methods

Every attribute of the PC tag 57 must has an associated get and setmethod. In particular, the following methods are created.

.getName( ),setName( ) .getRoot( ),setRoot( ) .getSource( ),setSource( ).getFormat( ),setFormat( ) .getLanguage( ),setLanguage( )Public Method doStartTag( )

Since there is no support for content within this tag, this methodsimply returns SKIP_BODY.

Public Method doEndTag( )

A page producer object is instantiated, named the value of the nameattribute and stored in the pageContext. The associated ML file isdetermined using the value of the source, format and languageattributes.

After all processing is complete, the value EVAL_PAGE is returned.

Public Class PresentationControlTag

This set of classes implement the custom JSP tag extension library forpresentation component 161 support of a specific control.

Public Get/Set Methods

Every attribute of the tag has an associated get and set method. Inparticular, the following methods are created.

.getName( ),setName( ) .getType( ),setType( ) .getId( ),setId( ).getParentPresentation( ),setParentPresentation( ) .getSource(),setSource( ) .getValue( ),setValue( ) .getEmpty( ),setEmpty( )Public Method doStartTag( )

This tag 57 requires a body therefore this method simply returns EVALBODY TAG.

Public Method doAfterBody( )

If there is any body content, then it should be appended to the bufferedoutput for the page. No iteration over the body is required; thereforethis method simply returns SKIP_BODY.

Public Method doEndTag( )

This parent name is a known page producer object or control object thatis found within the pageContext.

A control of the appropriate type is instantiated and stored in thepageContext.

The control's data control property is set. If the empty attribute isset then an empty value is used for the property. If the value attributeis set then it provides the literal value for the property. Otherwise,the source attribute is interpreted to get the value for the property.The interpretation of the source attribute involves the following steps.

-   -   Separate the base name (everything to the left of the first “.”        if there is one) from the qualification path (everything to the        right of the first “.” if there is one)    -   If the base name is a script variable name    -   Then lookup the script variable name value    -   Else if the base name is a servlet request parameter name    -   Then lookup the servlet request parameter name value    -   Else the base name must be a function component 59 instance name    -   Lookup the function component 59 instance name to get the        function component 59 instance object    -   If there is a qualification path    -   Then evaluate the qualification path by calling get methods on        each of the elements of the qualification path    -   Now there should be a value for the prerequisite data element    -   After all processing is complete, the value EVAL_PAGE is        returned.

Public Class PresentationAttributeTag

This set of classes implement the custom JSP tag extension library forpresentation component 161 support of attributes of a specific control.

Public Get/Set Methods

Every attribute of the tag has an associated get and set method. Inparticular, the following methods are created.

.getName( ),setName( ) .getSource( ),setSource( ) .getValue( ),setValue() .getEmpty( ),setEmpty( )Public Method doStartTag( )

Since there is no support for content within this tag, this methodsimply returns SKIP_BODY.

Public Method doEndTag( )

The parent control is found within the pageContext and the attribute isset.

If the empty attribute is set then an empty value is used for theproperty. If the value attribute is set then it provides the literalvalue for the property. Otherwise the source attribute is interpreted toget the value for the property. The interpretation of the sourceattribute involves the following steps.

-   -   Separate the base name (everything to the left of the first “.”        if there is one) from the qualification path (everything to the        right of the first “.” if there is one)    -   If the base name is a script variable name    -   Then lookup the script variable name value    -   Else if the base name is a servlet request parameter name    -   Then lookup the servlet request parameter name value    -   Else the base name must be a function component 59 instance name    -   Lookup the function component 59 instance name to get the        function component 59 instance object    -   If there is a qualification path    -   Then evaluate the qualification path by calling get methods on        each of the elements of the qualification path    -   Now there should be a value for the prerequisite data element    -   After all processing is complete, the value EVAL_PAGE is        returned.

Public Class PresentationProducePageTag

This class implements the custom JSP tag extension library forpresentation component 161 support for producing the output page.

Public Get/Set Methods

Every attribute of the tag has an associated get and set method. Inparticular, the following methods are created.

.getPage ( ) setPage ( )

Although the invention has been described with reference to certainspecific embodiments, various modifications thereof will be apparent tothose skilled in the art without departing from the spirit and scope ofthe invention as outlined in the claims appended hereto.

1. A method for hosting a computer executable multi-tier application forinteraction over a network with a user interface, the applicationincluding an application presentation tier, the method comprising thesteps of: selecting a first presentation template, the first templateincluding a first presentation instruction for defining a correspondingfirst presentation element; selecting a first presentation component ofthe application presentation tier for processing the first presentationinstruction; and, linking the first presentation component to the firsttemplate, wherein the first component processes the first presentationinstruction and generates the first presentation element duringexecution of the multi-tier application for subsequent delivery to theuser interface.
 2. The method of claim 1 further comprising theadditional steps of: selecting a second presentation template, thesecond template including a second presentation instruction for defininga corresponding second presentation element; selecting the firstpresentation component for processing the second presentationinstruction; and, linking the first component to the second template,wherein the first component processes the second presentationinstruction and generates the second presentation element duringexecution of the multi-tier application for subsequent delivery to theuser interface.
 3. The method of claim 1, wherein the multi-tierapplication further includes an application logic tier.
 4. The method ofclaim 1, wherein the method comprises the additional steps of: selectingan input datum; selecting a first function component of the applicationlogic tier for processing the input datum; and, linking the input datumto the first function component, wherein the first function componentprocesses the input datum and generates an output datum during executionof the multi-tier application.
 5. The method of claim 4, wherein thefirst template further comprises an output data presentation instructionfor further defining the corresponding first presentation element toinclude the output datum.
 6. The method of claim 5 comprising theadditional step of: directing the first presentation component toprocess the output datum presentation instruction, wherein the firstpresentation component processes the output datum presentationinstruction and generates the first presentation element incorporatingthe output datum during execution of the multi-tier application.
 7. Themethod of claim 2, wherein the presentation templates are computerreadable files.
 8. The method of claim 7, wherein the presentationinstructions are selected from the group comprising: layout, style andformat of the first presentation element.
 9. The method of claim 8,wherein the presentation instructions are written in a markup language.10. The method of claim 9, wherein the markup language is selected fromthe group comprising: HTML, HDML and WML.
 11. The method of claim 5,wherein the output datum presentation instruction defines a controlwithin which the output datum is presented.
 12. The method of claim 11,wherein the control is selected from the group comprising of Text field,Password field, Hidden field, Text area, Table, List box, Check box,Radio button, Image, Push button, Image button, Submit button, Resetbutton, Link and Span.
 13. The method of claim 1, wherein the firstpresentation component is a computer executable file.
 14. The method ofclaim 13, wherein the computer executable file is a java bean.
 15. Themethod of claim 4, wherein the first function component is a computerexecutable file.
 16. The method of claim 15, wherein the computerexecutable file is a java bean.
 17. The method of claim 1, wherein thefirst presentation component is linked to the first presentationtemplate by a direction element.
 18. The method of claim 17, wherein thedirection element specifies the location of the first presentationtemplate and directs the first presentation component to the specifiedlocation.
 19. The method of claim 18, wherein the direction element is afirst presentation component tag.
 20. The method of claim 19, whereinthe first presentation component tag is selected from the groupcomprising: page Tag; control Tag; attribute Tag; producePage Tag; clearTag; and interceptor Tag.
 21. The method of claim 19, wherein the firstpresentation component tag is expressed as a directive of a directionmodule, the direction module implementing the multi-tier application.22. The method of claim 21, wherein the direction module is a javaserver page.
 23. The method of claim 1, wherein the first functioncomponent is linked to the input datum by a direction element.
 24. Themethod of claim 23, wherein the direction element specifies the locationof the input datum and directs the first function component to thespecified location.
 25. The method of claim 24, wherein the directionelement is a first function component tag.
 26. The method of claim 25,wherein the first function component tag is selected from the groupcomprising: init Tag; call Tag; prerequisite Tag; debug Tag; error Tag;getValue Tag; if Tag.
 27. The method of claim 26, wherein the firstfunction component tag is expressed as a directive of a directionmodule, the direction module implementing the multi-tier application.28. The method of claim 21, wherein the direction module is a javaserver page.
 29. The method of claim 1 further comprising the step ofrepresenting a display item on the user interface as a plurality ofdisplay portions, at least two of the portions associated with adifferent one of presentation templates.
 30. The method of claim 29,wherein the presentation templates are reusable such that one of thetemplates is used to generate at least two of the portions.
 31. A systemfor hosting a computer executable multi-tier application for interactionover a network with a user interface, the application including anapplication presentation tier, the system comprising: a firstpresentation template, the first template including a first presentationinstruction for defining a corresponding first presentation element; afirst presentation component of the application presentation tier forprocessing the first presentation instruction; and, a first directionelement for linking the first presentation component to the firsttemplate; wherein the first component processes the first presentationinstruction and generates the first presentation element duringexecution of the multi-tier application for subsequent delivery to theuser interface.
 32. The system of claim 31 further comprising: a secondpresentation template, the second template including a secondpresentation instruction for defining a corresponding secondpresentation element; and, a second direction element for linking thefirst component to the second template, wherein the first componentprocesses the second presentation instruction and generates the secondpresentation element during execution of the multi-tier application forsubsequent delivery to the user interface.
 33. The system of claim 31,wherein the multi-tier application further includes an application logictier.
 34. The system of claim 31 further comprising: a first functioncomponent of the application logic tier for processing an input datum;and, the first direction element further linking the input datum to thefirst function component, wherein the first function component processesthe input datum and generates an output datum during execution of themulti-tier application.
 35. The system of claim 34, wherein the firsttemplate further comprises an output data presentation instruction forfurther defining the corresponding first presentation element to includethe output datum.
 36. The system of claim 35, wherein the firstpresentation component processes the output datum presentationinstruction and generates the first presentation element incorporatingthe output datum during execution of the multi-tier application.
 37. Thesystem of claim 32, wherein the presentation templates are computerreadable files.
 38. The system of claim 37, wherein the presentationinstructions are selected from the group comprising: layout, style andformat of the first presentation element.
 39. The system of claim 38,wherein the presentation instructions are written in a markup language.40. The system of claim 39, wherein the markup language is selected fromthe group comprising: HTML, HDML and WML.
 41. The system of claim 35,wherein the output datum presentation instruction defines a controlwithin which the output datum is presented.
 42. The system of claim 41,wherein the control is selected from the group comprising of Text field,Password field, Hidden field, Text area, Table, List box, Check box,Radio button, Image, Push button, Image button, Submit button, Resetbutton, Link and Span.
 43. The system of claim 41, wherein the firstpresentation component is a computer executable file.
 44. The system ofclaim 43, wherein the computer executable file is a java bean.
 45. Thesystem of claim 34, wherein the first function component is a computerexecutable file.
 46. The system of claim 45, wherein the computerexecutable file is a java bean.
 47. The system of claim 31, wherein thefirst presentation component is linked to the first presentationtemplate by a direction element.
 48. The system of claim 47, wherein thedirection element specifies the location of the first presentationtemplate and directs the first presentation component to the specifiedlocation.
 49. The system of claim 48, wherein the direction element is afirst presentation component tag.
 50. The system of claim 49, whereinthe first presentation component tag is selected from the groupcomprising: page Tag; control Tag; attribute Tag; producePage Tag; clearTag; and interceptor Tag.
 51. The system of claim 49, wherein the firstpresentation component tag is expressed as a directive of a directionmodule, the direction module implementing the multi-tier application.52. The system of claim 51, wherein the direction module is a javaserver page.
 53. The system of claim 31, wherein the first functioncomponent is linked to the input datum by a direction element.
 54. Thesystem of claim 53, wherein the direction element specifies the locationof the input datum and directs the first function component to thespecified location.
 55. The system of claim 54, wherein the directionelement is a first function component tag.
 56. The system of claim 55,wherein the first function component tag is selected from the groupcomprising: init Tag; call Tag; prerequisite Tag; debug Tag; error Tag;getValue Tag; if Tag.
 57. The system of claim 56, wherein the firstfunction component tag is expressed as a directive of a directionmodule, the direction module implementing the multi-tier application.58. The system of claim 51, wherein the direction module is a javaserver page.